package ast;

import java.math.BigInteger;

import math.exact.Complex;
import math.exact.Rational;

public class ExactComplex implements NumberConstant {

	private Complex value;

	public ExactComplex(BigInteger realNumerator, BigInteger realDenominator,
			BigInteger imagNumerator, BigInteger imagDenominator) {
		Rational real = new Rational(realNumerator, realDenominator);
		Rational imag = new Rational(imagNumerator, imagDenominator);
		this.value = new Complex(real, imag);
	}

	public Complex getValue() {
		return value;
	}

	@Override
	public void accept(Visitor visitor) {
		visitor.visitExactComplex(this);
	}

}
